package com.sdkj.dspservice.modules.report.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sdkj.dspservice.common.base.entity.DataEntity;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 表配置实体
 * @author tm
 */
@Slf4j
@Data
@TableName(value = "report_report")
public class Report extends DataEntity<Report> {

    /**
     * 名称
     */
    @NotBlank(message = "名称不能为空")
    private String name;
    /**
     * 描述
     */
    @NotBlank(message = "描述不能为空")
    private String description;
    /**
     * 数据表名
     */
    @NotNull(message = "数据表不能为空")
    private String tableConfigId;
    /**
     * 条件字段（以“,”分割）
     */
    private String conditions;
    /**
     * 查看次数
     */
    private Integer seeNumber;
    /**
     * 点赞次数
     */
    private Integer goodNumber;

    @TableField(exist = false)
    private List<String> conditionList;
    @TableField(exist = false)
    private TableConfig tableConfig;

    public Report() {
    }

    public Report(String id) {
        super(id);
    }
}